import { server } from './server'

interface ILoginParams {
  phone: string;
  code: string;
}
interface ILoginResponse {
  token: string;
  teacher: Object;
  department: string;
  duty: string;
  rank: string;
}
type TSex = 'BOY' | 'GIRL'
export interface IStudent {
  username?: string;
  birthday?: string;
  head?: string;
  userNum?: string;
  mobile?: string;
  sex?: TSex;
}
// 用户登录
export const getLogin = (params: ILoginParams) => {
  return server.POST<ILoginParams, ILoginResponse>('/api/t/v1/teacher/login', params)
}

// 登陆发送验证码
export const sendCode = (params: string) => {
  return server.POST(`/api/t/v1/teacher/sendCode?mobile=${params}`)
}


